1. Field of the Invention
The present invention relates generally to the area of data security and in particular relates to a method and apparatus for integrated ciphering and hashing.
2. Description of the Related Art
Cryptographic applications are frequently employed to insure the secure transmission of messages. Cryptographic applications encrypt the message (also referred to herein as plaintext) on the transmission side and decrypt or decode the encrypted message (also referred to herein as ciphering) on the receiving side. This encryption and decryption of messages is commonly known in the art as the ciphering.
In recent years, a number of cryptographic applications also include a feature that allows a user to append a digital signature to a particular message. This digital signature is employed to authenticate the source of a message. This process of signing or authentication is commonly known in the art as signature processing. Both ciphering and signature processing are important components in insuring the secure transmission of messages.
One of the key elements of signature generation and processing is computing a hash value corresponding to a message (e.g., plaintext). In the prior art, the ciphering and hashing occurred in series. For example, a cipher unit processed a message first. Thereafter, the message is passed to a hash unit to perform the hash computation on the message.
The primary disadvantage of this serial implementation of the cipher unit and hash unit is that hash computation cannot begin until the cipher unit completed the encryption or decryption. In other words, the serial implementation suffered in terms of performance. In addition, a two pass system suffers from security issues since the message can be tampered with between the two passes.
First, ciphering algorithms and hash algorithms typically operate on data having different block sizes. For example, whereas a ciphering algorithm would operate on data having a first size (e.g., 64 bits in DES) a hash algorithm may operate on data having a second block size (e.g., 512 bits in MD5 and SHA).
Second, the ciphering algorithms and hash algorithms typically have a different number of processing steps. For example, the DES encryption algorithm, which is a National Bureau of Standard's protocol, specified by Data Encryption Standard, Federal Information Processing Publication 46 includes 16 steps, while the MD5 (R. L. Rivest, "The MD5 Message Digest Algorithm," Request for Comment 1321, April, 1992) hashing algorithm includes 64 steps. In a hardware implementation, each step typically is performed in one clock cycle. It is understood by those skilled in the art that the actual number of cycles for each step is variable and depends on the process technology employed to implement the cipher and hash operations. It is appreciated that the time for the cipher unit to complete its processing is different from the time for the hash unit to complete its processing.
Accordingly, a method and apparatus for integrated ciphering and hashing that overcomes the disadvantages noted previously is needed.